package com.newtouch.cq.lang.em;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.newtouch.cq.lang.annotation.InitEnumToMapAn;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 状态类型枚举
 *
 * @author Alex
 */
@InitEnumToMapAn(name = "status")
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum StatusEnum implements IEnum<Integer> {
    DELETE(-1, "删除", "删除"),
    INVALID(0, "无效", "停用"),
    VALID(1, "有效", "启用"),

    NOT_FOUND(null,"","");

    @JsonValue
    private Integer value;
    private String desc;
    private String desc1;


    private static Log log = LogFactory.get(StatusEnum.class);

    StatusEnum(Integer value, String desc, String desc1) {
        this.value = value;
        this.desc = desc;
        this.desc1 = desc1;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public String getDesc1() {
        return desc1;
    }
}
